package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;

public class AddAttachmentEvent extends GwtEvent<AddAttachmentEventHandler> {

    public static Type<AddAttachmentEventHandler> TYPE = new Type<AddAttachmentEventHandler>();

    private final Long articleId;

    public AddAttachmentEvent(Long articleId) {
        this.articleId = articleId;
    }

    public Long getArticleId() {
        return articleId;
    }

    @Override
    protected void dispatch(AddAttachmentEventHandler handler) {
        handler.onAddAttachment(this);

    }

    @Override
    public Type<AddAttachmentEventHandler> getAssociatedType() {
        return TYPE;
    }

}
